set a User on-call or off-call

Hi,
I would like to write a simple script to set a user on-call or off-call using the IPs but I have not found any availble for this.
does anyone have an idea how to do it?
thank you

Hi Steven,

Can you clarify for us what role the IPs you’re referring to would play in this desired workflow?